package com.edwarder.service.impl;

import com.alibaba.fastjson.JSON;
import com.edwarder.dao.AreaDao;
import com.edwarder.entity.Area;
import com.edwarder.service.AreaService;
import utils.MybatisUtils;

import java.util.List;

/**
 * @Auther: jzhang
 * @Date: 2018/9/21 15:21
 * @Description:
 */
public class AreaServiceImpl implements AreaService {
    private AreaDao areaDao = MybatisUtils.getSqlSession().getMapper(AreaDao.class);

    @Override
    public String getAeaJSONString(String cityid) {
        List<Area> list = areaDao.findListByCityId(Integer.valueOf(cityid));
        return JSON.toJSONString(list);
    }
}
